/**
 * <p>Copyright:Copyright(c) 2019</p>
 * <p>Company:Professional</p>
 * <p>Package:com.cesgroup.zw.spring.boot.echarts.rose</p>
 * <p>File:SimpleRoseSeries.java</p>
 * <p>类更新历史信息</p>
 * @todo chanlong(陈龙) 创建于 Jun 6, 2019 3:38:49 PM
 */
package com.cesgroup.zw.spring.boot.library.echarts.rose.simple;

import com.cesgroup.zw.spring.boot.echarts.component.series.Pie;
import com.cesgroup.zw.spring.boot.echarts.enums.FontWeight;
import com.cesgroup.zw.spring.boot.echarts.enums.RoseType;
import com.cesgroup.zw.spring.boot.echarts.model.series.LabelLine;
import com.cesgroup.zw.spring.boot.echarts.model.style.ItemStyle;
import com.cesgroup.zw.spring.boot.echarts.model.style.LabelStyle;
import com.cesgroup.zw.spring.boot.echarts.model.style.LineStyle;
import com.cesgroup.zw.spring.boot.echarts.model.style.RichStyle;

/**
 * <p>描述: </p>
 * <p>Company: Professional</p>
 * @author chanlong(陈龙)
 * @date Jun 6, 2019 3:38:49 PM
 * @version 1.0.2019
 */
@SuppressWarnings("serial")
public class SimpleRoseSeries extends Pie {

	public SimpleRoseSeries(SimpleRoseParam param) {
		this.setName(param.getName());
		this.setRoseType(RoseType.radius);
		this.setLabel(new LabelStyle() {{
			this.setFormatter("['{c|{@[1]}次}', '{b|{b}}'].join('\\n')");
			this.rich("c", new RichStyle() {{
				this.setFontSize(20);
				this.setFontWeight(FontWeight.bold);
				this.setLineHeight(5);
			}}).rich("b", new RichStyle() {{
				this.setFontSize(15);
				this.setHeight(40);
			}});
		}});
		this.setLabelLine(new LabelLine() {{
			this.setSmooth(0.2);
			this.setLength(10);
			this.setLength2(20);
			this.setLineStyle(new LineStyle() {{
				this.setColor("rgb(98,137,169)");
			}});
		}});
		this.setItemStyle(new ItemStyle() {{
			this.setShadowColor("rgba(0, 0, 0, 0.6)");
			this.setShadowBlur(10);
		}});
	}
}
